import request from '@/utils/request'

//订单管理
export function selectallorderlist(params) {
  return request({
    url: '/api/getAllorderlist',
    method: 'get',
    params
  })
}

export function get_orderrecord(params) {
  return request({
    url: '/api/get_order_record_byid',
    method: 'get',
    params
  })
}

export function createorder(params) {
  return request({
    url: '/api/insert_order',
    method: 'post',
    params
  })
}

export function insert_orderrecord(params) {
  return request({
    url: '/api/insert_order_record',
    method: 'post',
    params
  })
}


export function delete_order(params) {
  return request({
    url: '/api/delete_order',
    method: 'post',
    params
  })
}


export function get_orderlistbypar(params) {
  return request({
    url: '/api/get_orderlistbypar',
    method: 'post',
    params
  })
}

export function get_orderlistbyuser(params) {
  return request({
    url: '/api/get_orderlistbyuser',
    method: 'post',
    params
  })
}


export function update_order(params) {
  return request({
    url: '/api/update_order',
    method: 'post',
    params
  })
}

export function update_orderhave(params) {
  return request({
    url: '/api/update_orderhave',
    method: 'post',
    params
  })
}

export function update_paytype(params) {
  return request({
    url: '/api/update_paytype',
    method: 'post',
    params
  })
}


//退单管理

export function selectallreturnorder(params) {
  return request({
    url: '/api/getAllreturnorder',
    method: 'get',
    params
  })
}

export function get_returnrecord(params) {
  return request({
    url: '/api/get_return_record_byid',
    method: 'get',
    params
  })
}


export function insert_returnorder(params) {
  return request({
    url: '/api/insert_returnorder',
    method: 'post',
    params
  })
}


export function delete_returnorder(params) {
  return request({
    url: '/api/delete_returnorder',
    method: 'post',
    params
  })
}


export function get_returnorderbypar(params) {
  return request({
    url: '/api/get_returnorderbypar',
    method: 'post',
    params
  })
}

export function get_returnorderbyuser(params) {
  return request({
    url: '/api/get_returnorderbyuser',
    method: 'post',
    params
  })
}

export function update_rtype(params) {
  return request({
    url: '/api/update_rtype',
    method: 'post',
    params
  })
}